package cn.sxt.controller;

import cn.xbtop.domain.UserAddress;
import cn.xbtop.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/5/7 21:08
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping("/initOrder")
    public List<UserAddress> findAllAddress(String userid){
        List<UserAddress> userAddresses = orderService.initOrder(userid);
        return userAddresses;
    }
}
